package com.css.zfzx.sjcj.modules.hddcGeochemicalAbnPoint.repository;

import com.css.zfzx.sjcj.modules.hddcGeochemicalAbnPoint.repository.entity.HddcGeochemicalabnpointEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zhangcong
 * @date 2020-11-28
 */
public interface HddcGeochemicalabnpointRepository extends JpaRepository<HddcGeochemicalabnpointEntity, String> {

    @Query(nativeQuery = true, value = "select * from hddc_geochemicalabnpoint where is_valid !=0 and project_name in :projectIds")
    List<HddcGeochemicalabnpointEntity> queryHddcGeochemicalabnpointsByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_geochemicalabnpoint where is_valid !=0 and task_name in :taskIds")
    List<HddcGeochemicalabnpointEntity> queryHddcGeochemicalabnpointsByTaskId(List<String> taskIds);
}
